package cn.com.nes.mybatis.callcenter.mapper;

import cn.com.nes.site.entity.dto.patrolPlan.GetPatrolDataItemValueDto;
import cn.com.nes.site.entity.dto.patrolPlan.PatrolEquipmentRecordDataItemValue;
import cn.com.nes.site.entity.dto.patrolPlan.PatrolPlanEquipmentRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface PatrolEquipmentRecordDataItemValueMapper extends BaseMapper<PatrolEquipmentRecordDataItemValue> {
    /**
     * 根据记录id查询检查内容值
     * @param recordId
     * @return
     */
    List<PatrolEquipmentRecordDataItemValue> getInfoByRecordId(@Param("recordId") Long recordId);
    /**
     * 根据记录id插入新的记录
     * @param recordId
     * @param previousId
     * @return
     */
    int insertById(@Param("recordId") Long recordId,@Param("previousId") Long previousId,@Param("gmtTime")Long gmtTime);

    /**
     * 根据记录id获取其检查结果itemValue
     * @param itemValue
     * @return
     */
    List<GetPatrolDataItemValueDto> getPatrolDataItemValue(PatrolEquipmentRecordDataItemValue itemValue);

    /**
     * 插入数据项
     *
     * @param records
     * @param newRecords
     * @return
     */
    Integer insertDataItemValueByTaskId(@Param("records") List<PatrolPlanEquipmentRecord> records,
                                        @Param("new")List<PatrolPlanEquipmentRecord> newRecords);

    /**
     * 根据id获取数据项详情
     *
     * @param records
     * @return
     */
    List<PatrolEquipmentRecordDataItemValue> getDataItemValuesById(@Param("records") List<PatrolPlanEquipmentRecord> records);

    void deleteByRecord(String record);
}